package site.wanjiahao.client;

import java.io.*;

/**
 * 上次文件请求
 */
public class UploadFileHttpRequest extends HttpPost {

    private final StringBuilder file_uuid = new StringBuilder();
    
    public UploadFileHttpRequest(String url) {
        this.url = url;
    }

    // 子类实现具体处理逻辑
    @Override
    protected void handler() throws IOException {
        writeFileParams(); // 写文件
//        writeStringParams(); // 可以添加写普通字段
        paramsEnd();

        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getInputStream()));
        String line;
        while ((line = bufferedReader.readLine()) != null) {
            file_uuid.append(line);
        }
    }
    
    public String getUUID() {
        return file_uuid.toString();
    }
  

}
